package ru.inse.core.service.realty.impl;

import java.util.List;

import ru.inse.core.domain.realty.RealtyObject;
import ru.inse.core.domain.realty.RealtyObjectType;
import ru.inse.core.domain.realty.RealtyRubric;
import ru.inse.core.service.realty.IRealtyObjectService;
import ru.inse.core.service.realty.filter.IRealtyFilter;
import ru.inse.core.service.realty.filter.ItemFilters;


public class RealtyObjectService
    implements IRealtyObjectService
{
//    private ItemCounter itemCounter;
    private final ItemFilters itemFilters = new ItemFilters();
//    private RealtyItemService realtyItemService;
    
    public RealtyObjectService()
    {
//        itemCounter = new ItemCounter(this);   
    }
    
//    public void setRealtyItemService(RealtyItemService realtyItemService)
//    {
//        this.realtyItemService = realtyItemService;
//        itemCounter.setRealtyItemService(realtyItemService);
//        realtyItemService.addItemListener(itemCounter);
//    }

    public RealtyObjectType [] getObjectTypes()
    {
        return RealtyObjectType.list();
    }

    public List<RealtyObject> getObjects(RealtyObjectType type)
    {
        return RealtyObject.getByType(type);
    }

    public RealtyRubric [] getRubrics()
    {
        return RealtyRubric.list();
    }

//    public Long getItemCount(RealtyQueryParam param, RealtyRubric rubric, RealtyObject object)
//    {
//        return itemCounter.getItemCount(param, rubric, object);
//    }

    public List<IRealtyFilter> getFilters(RealtyObject realtyObject)
    {
        return itemFilters.getFilters(realtyObject);
    }
}
